From: Jan Djärv Date: Fri, 14 Nov 2003 19:13:02 +0000 (+0000) Subject: * xterm.c (x_detect_focus_change): Do not change focus frame for X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~24993 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=4c1f8cd2f404b45f8d12c926133431362e04df8e;p=emacs.git * xterm.c (x_detect_focus_change): Do not change focus frame for Enter/LeaveNotify if the current focus frame has explicit focus. --- diff --git a/src/ChangeLog b/src/ChangeLog index e6a0a8fdede..639afc4b8fd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2003-11-14 Jan Dj,Ad(Brv + + * xterm.c (x_detect_focus_change): Do not change focus frame for + Enter/LeaveNotify if the current focus frame has explicit focus. + 2003-11-14 Kim F. Storm * dispnew.c (update_text_area): Fix redisplay error when hscroll diff --git a/src/xterm.c b/src/xterm.c index 638ce463065..85beb00eb52 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -3209,16 +3209,22 @@ x_detect_focus_change (dpyinfo, event, bufp, numchars) { case EnterNotify: case LeaveNotify: - if (event->xcrossing.detail != NotifyInferior - && event->xcrossing.focus - && ! (frame->output_data.x->focus_state & FOCUS_EXPLICIT)) - nr_events = x_focus_changed ((event->type == EnterNotify - ? FocusIn : FocusOut), - FOCUS_IMPLICIT, - dpyinfo, - frame, - bufp, - numchars); + { + struct frame *focus_frame = dpyinfo->x_focus_event_frame; + int focus_state + = focus_frame ? focus_frame->output_data.x->focus_state : 0; + + if (event->xcrossing.detail != NotifyInferior + && event->xcrossing.focus + && ! (focus_state & FOCUS_EXPLICIT)) + nr_events = x_focus_changed ((event->type == EnterNotify + ? FocusIn : FocusOut), + FOCUS_IMPLICIT, + dpyinfo, + frame, + bufp, + numchars); + } break; case FocusIn: